﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Testing_components
{
    public class ConditionOpPair : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        private string _sensorname;
        private string _op;
        private double _comvalue;

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public string SensorName
        {
            get { return _sensorname; }
            set
            {
                if (_sensorname != value) _sensorname = value;
                OnPropertyChanged("SensorName");
            }
        }

        public string OP
        {
            get { return _op; }
            set
            {
                if (_op != value) _op = value;
                OnPropertyChanged("OP");
            }
        }

        public double CompareValue
        {
            get { return _comvalue; }
            set
            {
                if (_comvalue != value) _comvalue = value;
                OnPropertyChanged("CompareValue");
            }
        }
    }
}
